FROM golang:1.18-alpine as build
ENV GO111MODULE on
ENV GOPROXY https://goproxy.cn,direct
WORKDIR $GOPATH/src/111/module10
ADD . $GOPATH/src/111/module10
RUN go mod download
RUN go build -o /main
EXPOSE 8080
ENTRYPOINT ["/main"]